#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main()
{
	int k1, n, k2, r;
	float i, j, sum;
	scanf("%d", &r);
	for (k1 = 0; k1 < r; k1++) {
		sum = 0.0; i = 2.0; j = 1.0;
		scanf("%d", &n);
		for (k2 = 0; k2 < n; k2++) {
			sum = sum + i / j;
			i = i + j;
			j = i - j;
		}
		printf("%.2lf\n", sum);
	}
	return 0;
}
//1084